import Vue from 'vue'
import Router from 'vue-router'
import Shop from '../components/Shop/Shop'
import ShopInfo from '../components/Shop/ShopInfo/ShopInfo'
import Goods from '../components/Shop/Goods/Goods'
import ShopRatings from '../components/Shop/ShopRatings/ShopRatings'
Vue.use(Router);

export default new Router({
  routes: [
    {
      path:'/',
      redirect:'/shop'
    },
    {
      path: '/shop',
      name: 'shop',
      component: Shop,
      children:[
        {
          path: '/shop/info',
          name: 'info',
          component: ShopInfo,
        },
        {
          path: '/shop/goods',
          name: 'goods',
          component: Goods,
        },
        {
          path: '/shop/ratings',
          name: 'ratings',
          component: ShopRatings,
        },
        {
          path: '/shop',
          redirect: '/shop/goods',
        }

      ]
    }
  ],
  linkActiveClass:'active'
})
